package com.lai.common.constant;

public class OrderConstant {

    public static final String USER_ORDER_TOKEN_PREFIX = "order:token";

    public enum OrderStatusEnum {
        CREATE_NEW(0,"待付款"),
        PAYED(1,"已付款"),
        SENDED(2,"已发货"),
        RECIEVED(3,"已完成"),
        CANCLED(4,"已取消"),
        SERVICING(5,"售后中"),
        SERVICED(6,"售后完成");
        private Integer code;
        private String msg;

        OrderStatusEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }


    public enum OrderSubmitEnum {
        SUCCESS(0,"提交成功"),
        TOKEN_VERIFY_ERROR(1,"令牌验证失败"),
        PRICE_ERROR(2,"验价失败"),
        STOCK_LOCK_ERROR(3,"库存锁定失败");
        private Integer code;
        private String msg;

        OrderSubmitEnum(Integer code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public Integer getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

}
